package com.duda.dao;

import com.duda.projo.DownFileHistory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DownFileHistoryMapper {
    @Select("select * from APP_DownFileHistory where WebUrl=#{webUrl}")
    public  List<DownFileHistory> getDownFileHistoryByWebUrl(String webUrl);

    @Select("select * from APP_DownFileHistory where WebUrl=#{webUrl} and State=#{state} and ChangeFlg=#{changeFlg}")
    public  List<DownFileHistory> getDownFileHistory(String webUrl,int state,int changeFlg);

    @Insert("insert into APP_DownFileHistory(ID,WebUrl,LocalUrl,Type,UserID,State,ChangeFlg,SourceTrue,CreateTime)" +
            "  values(#{id},#{webUrl},#{localUrl},#{type},#{userID},#{state},#{changeFlg},#{sourceTrue},#{createTime})")
    public void insertDownFileHistory(DownFileHistory downFileHistory);
}
